<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:output
		indent="yes"
		encoding="UTF-8"
		omit-xml-declaration="yes"
		/>
	<xsl:include href="Page.xsl"/>
	
	<xsl:param name="xpath" select="''"/>
	<xsl:param name="id" select="''"/>

	<xsl:template match="Page">
		<xsl:apply-templates select="Form" />
		<xsl:apply-templates select="ImageList" />
	</xsl:template>
	
	<xsl:template match="GetContent">
		<xsl:value-of select="Content" disable-output-escaping="yes"/>
	</xsl:template>
	
	<xsl:template match="EditContent">
		<form action="javascript:void(0);" method="post" id="{@id}_form" alt="{@xpath}">
			<span id="{@id}_data">
				<xsl:value-of select="Content" disable-output-escaping="yes"/>
			</span>
		</form>
	</xsl:template>

	<xsl:template match="CMSPart">
		<img src="{.}"/>
	</xsl:template>

	<xsl:template match="Form">
		<xsl:apply-templates select="." mode="system" />
	</xsl:template>

	<xsl:template match="ImageList">
		<xsl:for-each select="*">
			<p>
				<a href="javascript:void(0)" onclick="updatePicture(this)"><img src="{src}" name="{Name}"/></a>
			</p>
		</xsl:for-each>
	</xsl:template>

</xsl:stylesheet>
